package com.webgis.backendservice.mapper;

import com.webgis.backendservice.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
//    @Select("select * from user where username =#{username} and password =#{password}")
    @Select("select * from user where username =#{username} and password =#{password}")
    List<User> login(String username, String password);

    @Insert("INSERT INTO user (username, password) VALUES (#{username}, #{password});")
    int register(String username, String password);

}
